package com.baizhi.interfacex2;

/**
 * 狗
 */
public class Dog extends Pet implements Running{

    public Dog() {
    }

    public Dog(String name, int age, String color) {
        super(name, age, color);
    }

    @Override
    public void eat() {
        System.out.println("这只"+getColor()+"颜色的"+getAge()+"岁的叫"+getName()+"的狗狗在吃骨头！！！");
    }

    public void brand(){
        System.out.println("这只"+getColor()+"颜色的"+getAge()+"岁的叫"+getName()+"的狗狗在朝着陌生人叫唤！！！");
    }

    @Override
    public void run() {
        System.out.println("这只狗追着陌生人在跑~~~");
    }
}
